﻿//Copyright Notice:  ©2009 Microsoft Corporation.  All rights reserved.
using System;
using System.Data;
using System.Collections.ObjectModel;

namespace Microsoft.InformationSecurity.CISF.Security.AuthZServices
{
    /// <summary>
    /// SQL parameter object
    /// </summary>
    public class SqlParameter
    {
        #region Constructor
        /// <summary>
        /// Object container for a Sql parameter definition.
        /// </summary>
        public SqlParameter() { }
        /// <summary>
        /// Object container for a Sql parameter definition.
        /// </summary>
        /// <param name="name">Name of the parameter.</param>
        /// <param name="type">SqlDbType of the parameter.</param>
        /// <param name="length">Length of parameter if character based.</param>
        /// <param name="value">The value of the parameter.</param>
        public SqlParameter(string name, SqlDbType type, int length, object value)
        {
            this.Name = name;
            this.Type = type;
            this.Length = length;
            this.Value = value;
        }

        #endregion

        #region Properties

        public string Name
        {
            get;
            set;
        }

        public SqlDbType Type
        {
            set;
            get;
        }

        public int Length
        {
            set;
            get;
        }

        public object Value
        {
            set;
            get;
        }

        #endregion
    }
}
